package com.itany.corejava.code08_常用类.练习2;

/**
 * @author MissChen
 * @version 1.0
 * @date 2023 年11月16日 9:33
 */
public class Student {
    private String name;
    private int age;
    private String address;
    private Hobby hobby;

    public Student(String name, int age, String address, Hobby hobby) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.hobby = hobby;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Hobby getHobby() {
        return hobby;
    }

    public void setHobby(Hobby hobby) {
        this.hobby = hobby;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                ", hobby=" + hobby +
                '}';
    }
}
